package com.spring.demo.beans;

import com.sun.istack.internal.Nullable;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by yangman on 2020/5/8.
 * 精简版本也要高仿的像一点 BeanFactory 不能少。
 */
public interface BeanFactory {
    // 来两个核心方法得了，其他的暂时先不搞了。
    Object getBean(String name) throws IllegalAccessException, InstantiationException, NoSuchFieldException;
    <T> T getBean(String name, @Nullable Class<T> requiredType) throws IllegalAccessException, NoSuchFieldException, InstantiationException, NoSuchMethodException, InvocationTargetException;
}
